package com.gxar.timeline.server.base.model.hmd.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author linsy
 * @version 1.0
 * @created 2023/9/26 09:48
 */
@Data
@ApiModel(value = "头显排行榜解析类")
public class HmdImportVO implements Serializable {

    private static final long serialVersionUID = -6576766841265990096L;

    @ApiModelProperty("公司/品牌名称")
    @JSONField(name = "company_name")
    @ExcelProperty(value = "公司/品牌名称")
    @NotNull(message = "为空")
    private String companyName;

    @ApiModelProperty("产品名称")
    @JSONField(name = "product_name")
    @ExcelProperty(value = "产品名称")
    @NotNull(message = "为空")
    private String productName;

    @ApiModelProperty("图片链接")
    @JSONField(name = "picture_url")
    @ExcelProperty(value = "图片链接")
    private String pictureUrl;

    @ApiModelProperty("发布日期")
    @JSONField(name = "issuance_date")
    @ExcelProperty(value = "发布日期")
    private String issuanceDate;

    @ApiModelProperty("上市日期")
    @JSONField(name = "listed_date")
    @ExcelProperty(value = "上市日期")
    private String listedDate;

    @ApiModelProperty("型号描述")
    @JSONField(name = "description")
    @ExcelProperty(value = "型号描述")
    private String description;

    @ApiModelProperty("发布价格")
    @JSONField(name = "price")
    @ExcelProperty(value = "发布价格")
    @Pattern(regexp = "([0-9.]+)\\s*([^\\d\\s]+)", message = "格式不正确")
    private String price;

    @ApiModelProperty("购买链接")
    @JSONField(name = "purchase_link")
    @ExcelProperty(value = "购买链接")
    private String purchaseLink;

}
